<template>
    <div class="header_box">
        <van-icon class="icon" name="arrow-left" @click="back" />
        <slot name="center" class="center"></slot>
        <slot name="right" class="right"></slot>
    </div>
</template>

<script>
export default {
    data() {
        return {}
    },
    props: {},
    methods: {
        back() {
            this.$router.go(-1)
        }
    }
}
</script>
<style scoped>
.header_box {
    width: 100%;
    background-color: rgba(255, 110, 83, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    font-size: 16px;
    color: aliceblue;
    position: relative;
}
.icon {
    position: absolute;
    left: 10px;
}
.center{
    margin: 0 auto;
}
.right{
    position: absolute;
    right: 12px;
}
</style>
